package com.hackerrank.challenges.findpoint;

import java.util.Scanner;

public class Solution {
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int T = in.nextInt();
		for(int t = 0; t < T; t++) {
			int Px = in.nextInt(), Py = in.nextInt(), Qx = in.nextInt(), Qy = in.nextInt();
			System.out.println((2 * Qx - Px) + " " + (2 * Qy - Py));
		}
	}
}
